home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / hardware / sapep2.lha / SAPEP_v2 / SAPEP_Docs.txt < prev    next >
Text File  |  1992-12-14  |  20KB  |  385 lines

  1.  
  2.             -----------------------------------------------------
  3.               _               _         _      _     Dec.14th 1992
  4.              (        /|     |_)       |_     |_)
  5.              _)imple /~|miga | arallel |_prom | rogrammer
  6.                                                             v2.0
  7.             -----------------------------------------------------
  8.   Hardware and software (c)1992  Silicon Synapse Electronics & John Kamchen
  9.                    ReqTools is Copyright (c) Nico François.
  10.  
  11.  
  12. ******************************************************************************
  13. *   This is SHAREWARE.  The fee is a mere $15.  If you use it, please pay.   *
  14. *                                                                            *
  15. *                        - What do I get for my $15 ? -                      *
  16. *                                                                            *
  17. *                     For the $15 Shareware fee, you get:                    *
  18. * A disk FULL of more great hardware projects (memory, video, audio & more)  *
  19. *          The lastest version of the software, and more TYPE files          *
  20. *                 Complete documented source code for SAPEP                  *
  21. *                     Laser printed schematic of circuit                     *
  22. *                                                                            *
  23. *                   Mail the money (in American funds) to:                   *
  24. *                                 John Kamchen                               *
  25. *                              41 Matheson Avenue                            *
  26. *                              Winnipeg Manitoba                             *
  27. *                               Canada   R2W 0C1                             *
  28. ******************************************************************************
  29.  
  30.                             ----------------------
  31.                             Before you do anything
  32.                             ----------------------
  33.     Some things to note before you go further.  I use words 'part' & 'type'
  34. alot.  These mean the same thing.  When you read the section on TYPE FILES,
  35. you will understand.
  36.  
  37.     You must have reqtools.library (supplied) in your LIBS: directory.
  38. ReqTools is Copyright (c) Nico François.
  39.  
  40.                                ---------------
  41.                                What is SAPEP ?
  42.                                ---------------
  43.     SAPEP is a semi-complex package consisting of control software, and
  44. programming hardware used to program eprom memory chips.  Unlike some OTHER
  45. eprom hacks floating around, this hardware will program a large variety of
  46. chips without the use 'personality moduals'.  All programming characteristics
  47. are controlled though the software.
  48.  
  49.  
  50.     About a year ago, I designed a fairly simple eprom programmer for the
  51. Amiga.  There was nothing fancy about it really, and could only program 21v
  52. 2764 & 27128 type chips.  These days, eproms use lower programing voltages,
  53. come in larger capacity and, much to many people's dismay, different pin
  54. definitons.
  55.  
  56.                             ----------------------
  57.                             What eproms can it do?
  58.                             ----------------------
  59.     Every eprom maker has thier own idea of how the chips should be programmed.
  60. Sure, the pinouts are all the same (in the majority of cases), but the
  61. programming steps & voltages vary from maker to maker.  As luck would have it,
  62. these odd voltages and timing pulse requirements are fairly simple to meet.
  63.  
  64.     The hardware limits what can be programmed.  As long as you follow this
  65. guide, you can't go wrong.
  66.  
  67. Capacity (K)  : 4Kx8, 8Kx8, 16Kx8, 32Kx8, 64Kx8, 128Kx8, 256Kx8, 512Kx8  *
  68. Vpp Voltages  : +12.00v +12.50v +12.75v +13.00v +21.00v
  69. Vcc Voltages  :  +5.00v  +6.00v  +6.25v  +6.50v
  70. PGM Widths    :  1.4us to 91.6ms
  71.  
  72. * The hardware supports the soon-to-be-released 1024Kx8 eproms as well.
  73.  
  74.  
  75.     Each manufacturer employs a custom programming sequence (called an
  76. algorythm).  TI uses Snap!, SGS has Presto II, and so on.  Many of these
  77. programming methods are a variation of the Snap! algorythm.  However, there is
  78. one algoythm supported by most (if not all) makers- FAST.  As far as speed
  79. goes, FAST is damn slow compared to Snap! (a 32k x8 chips take about 10
  80. seconds to program using Snap!, but 131 seconds with FAST).  If the chip
  81. supports FAST, then it may say something like  PGM @ 12.5v  or VPP 12.75v on
  82. the top.  See the section on the 'TYPE:'  files later on.
  83.  
  84.                                 --------------
  85.                                 Signature Mode
  86.                                 --------------
  87.     All eprom manufacturers support what is known as 'Signature Mode'.  When
  88. you power up the eprom, and apply 12.00v to A9, the chip outputs 2 bytes
  89. (depending on A0).  The first byte is the manufacture's number, the second is
  90. the device number.  Bit 7 (MSB) contains the parity bit.  An example is the
  91. TMS27C256 from Texes Instruments.  The code comes back as:
  92.  
  93. Manufacturer:151 ($97)
  94. Device      :004 ($04)
  95.  
  96.     Suppose you have a chip with the part numbers scratched off.  As long as
  97. you are VERY sure the part is an eprom, you could try the get the signature to
  98. find out who made it, and it's capacity (assuming you have many data books to
  99. look up the codes).
  100.  
  101.     The CMOS type chips seem to be more likely to support this feature, but
  102. I've seen some NMOS devices (from SGS Thomson) that do as well.  The program
  103. allows you to read the chip's signature.
  104.  
  105.                                     *Note*
  106. With a part name like 27C (C for Cmos), we can assume it will have a
  107. signature, but if there is no C, then a signature test MIGHT damage the chip.
  108.  
  109.                                  -----------
  110.                                  TYPE: files
  111.                                  -----------
  112.     In order to know the specific voltages for each eprom device, I came up
  113. with TYPE files.  These have the following format:
  114.  
  115. Part :TMS27C32          ; Part number as it appears on the chip              1
  116. Name :Texas Instruments ; Manufacturer's name                                2
  117. Size :4                 ; Size in Kilobytes (this is a 4k x 8 eprom)         3
  118. Vpp  :1300              ; Vpp during programming                             4
  119. Vcc  :650               ; Vcc during programming                             5
  120. twPGM:100               ; Initial (prime) pulse width (in MICRO seconds)     6
  121. twMUL:0                 ; Multiplication factor for Final Pulse tw(FPGM)     7
  122. Xcnt :10                ; Number of times pulse can be applied               8
  123. Algth:SNAP!             ; Programming algorithm                              9
  124. User :0                 ;                                                   10
  125. ;  John Kamchen SSE (204)589-1078 v32bis Oct.27th 1992 TI MOS Memory (1989) 11
  126.  
  127. Line 1 : This is the part number as it appears on the chip. Do not include the
  128.          chip speed, or package details.
  129. Line 2 : Manufacturer's name ( AMD  or  American Micro Devices is fine).
  130. Line 3 : The TMS27C32 is 4 kilobytes in size (BYTES, not BITS)
  131. Line 4 : Vpp   used for programming algorythm
  132. Line 5 : Vcc   used for programming algorythm
  133. Line 6 : twPGM used for programming algorythm
  134. Line 7 : twMUL used for programming algorythm
  135. Line 8 : Xcnt  used for programming algorythm
  136. Line 9 : Algorythm
  137. Line 10: RESERVED Just leave it at 0 (Used for future expansion).
  138. Line 11: Name/Phone # who wrote this file plus the date and source of info
  139.  
  140.                 Algorythms supported (as of December 1st 1992)
  141.    Name:    User:                               Speed: (best case) Eg.32k x8
  142.    FAST     Generic, most chips support it.        4s per K        131 seconds
  143.    SLOW     Used for 2732A type chips           10.2s per K        328 seconds
  144.    CRAWL    Old 50ms per byte, for 21v proms    51.2s per K       27.5 minutes
  145.    Snap!    Texas Instruments.  Very quick      102ms per K        3.3 seconds
  146. Presto II   SGS Thomson         Very quick      102ms per K        3.3 seconds
  147.  
  148.     The above speeds are best case.  In reality, the programmer hardware &
  149. software need some time to transfer the data to and fro, so an 32k x8 SNAP!
  150. eprom might really takes about 1 minute to program and verify.  If the
  151. algorythms were written in pure ML, then that time is sure to drop to 20
  152. seconds.
  153.     What does a programming algorythm look like?  Most look like this (from
  154. the TI Memory Databook):
  155.               _______
  156.              ( START )               TI's Snap! algorythm
  157.               ~~~|~~~
  158.      ____________V____________
  159.     | Address =First Location |
  160.      ~~~~~~~~~~~~|~~~~~~~~~~~~
  161.      ____________V____________  For TYPE files, Vcc is 650 & Vpp is 1300
  162.     | Vcc= 6.50v, Vpp= 13.0v  | (to avoid floating point operations)
  163.      ~~~~~~~~~~~~|~~~~~~~~~~~~
  164.      ____________V____________           ___________________
  165.     | Program one pulse 100us | <-------| Increment Address |
  166.      ~~~~~~~~~~~~|~~~~~~~~~~~~           ~~~~~~~~~~^~~~~~~~~~
  167.             _____V____        100us is             |
  168.            /   Last   \ No    the twPGM            |
  169.            \ Address? /~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
  170.         Yes ~~~~~|~~~~
  171.      ____________V____________
  172.  .> |          X = 0          |
  173.  |   ~~~~~~~~~~~~|~~~~~~~~~~~~          _________________________
  174.  |               | <-------------------| Program one pulse 100us |
  175.  |               |                      ~~~~~~~~~~~~~^~~~~~~~~~~~
  176.  |          _____V____          __________       ____|____No
  177.  |         /  Verify  \ Fail   | X = X + 1|     / X = 10? \  ; Xcnt factor
  178.  |         \   Byte   /~~~~~~~~~~~~~~~~~~~~~~~~~\_________/
  179.  |          ~~~~~|~~~~                               |
  180.  |          _____V____Pass                           | Yes
  181.  |    No   /   Last   \                              |
  182.  '---------\ Address? /                              |
  183.             ~~~~~|~~~~                               |
  184.                  | Yes                               |
  185.      ____________V____________                       |
  186.     |     Vcc = Vpp = 5.00    |                      |
  187.      ~~~~~~~~~~~~|~~~~~~~~~~~~                       |
  188.          ________|________                  _________|________
  189.         /Compare all bytes\  Fail          | Device is faulty |
  190.         \to original data /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191.          ~~~~~~~~|~~~~~~~~
  192.                  |  Pass
  193.            ______V______
  194.           /Device Passed\
  195.           \Ready to use /
  196.            ~~~~~~~~~~~~~
  197.  
  198.     To sum up, this is the basic configuration for the different algorythms:
  199.  
  200. FAST     :  Vcc=600  Vpp=1250  twPGM=1000  twMUL=3  Xcnt=25
  201. SNAP!    :  Vcc=650  Vpp=1300  twPGM=100   twMUL=0  Xcnt=10
  202. Presto II:  Vcc=625  Vpp=1275  twPGM=100   twMUL=0  Xcnt=25
  203.  
  204.     As you can see, even though SNAP! & Presto2 work the same way, the
  205. voltages the chip needs vary.  That's why I used the type files.
  206. The GenericNNk type files assume FAST.  Study the type files before you write
  207. your own.  Read the EXAMPLE file, and use the TEMPLATE to make your own files.
  208. Don't use the ; comments in your files (after line 10, enter anything you
  209. want).
  210.  
  211.                                 --------------
  212.                                 Warning Lights
  213.                                 --------------
  214.     There are 4 LEDs on the programmer.  D1 & D2 are the socket power
  215. indicators. If D1 is lit (red), that means keep your hands off, the socket
  216. has power, and you can't insert or remove anything when there is power.
  217. When D2 is lit (green), then the socket it totally powered down, and it's safe
  218. to insert/remove a chip.  D3 (yellow) is lit when high voltage (12 and up) is
  219. present on the socket. Finally, D4 (red) is lit when the programmer is turned
  220. on.
  221.  
  222.                                  ------------
  223.                                  Construction
  224.                                  ------------
  225.     See the file 'SAPEP_Built_It.txt' for details on how to build the hardware.
  226.  
  227.  
  228.                               ------------------
  229.                               Using the software
  230.                               ------------------
  231.  
  232.     There is nothing fancy about this software, it does the basic tasks.  If
  233. you run it from CLI, then certain functions will print values to the CLI.
  234. Run it from Workbench, and you don't get these values.  I tried to get
  235. ReqTools to show some kind of 'status', but that is a bit beyond my programming
  236. scope.  All I can say is, best run it from CLI.
  237.  
  238.     The first thing the software does is ask you to verify that you indeed
  239. have the SAPEP hardware plugged in (and powered up).
  240.  
  241.                  The main menu has a few options. These are:
  242.  
  243.                      - 1. Select Source/Destination file -
  244.     A file requester pops up, asking you for a path/file.  This is the
  245. standard ReqTools FileReq.  This file name will will be WRITTEN to and READ
  246. from, depending on your actions.  Keep this in mind.
  247.  
  248.                                * release note *
  249. Program can only work with DEVICE:FILE , not DEVICE:DIR/FILE .  This bug will
  250. be corrected next version.  Seems to be because I'm using ANSI file routines,
  251. not AmigaDOS.  Keep files in RAM disk, you can't go wrong.
  252.  
  253.                               - 2. Select part -
  254.     Assuming you have assigned TYPES: to the directory where your type files
  255. reside, you should get a file requester listing all your known part numbers.
  256. The info in this type file will setup the eprom characteristics.  ALL tasks
  257. you can do (read/program, compare, etc) will depend on this type file.  The
  258. only exception is Signature mode.
  259.  
  260.                             - 3. Signature Mode -
  261.     This function will present you with four choices. 3 package sizes, and a
  262. cancel.  Since address pin 9 is on the same ZIF pin no matter what chip you
  263. have, all we need to know is how many pins the chip has (so that +5v can be
  264. applied to the Vcc pin).  The result will be manufactuters ID and device ID.
  265. Both are shown in decimal and hex.  If the device doesn't support signature
  266. mode, but you forget to hit cancel, 255 ($FF) will come up.  Did you damage
  267. the chip? Who knows.  In the TYPES: dir, there is a file called Signatures,
  268. which contains a few examples of what can be learned from these two bytes.
  269. Feel free to add to this file (and the type files as well).
  270.  
  271.                             - 4. Compare 2 File -
  272.     Sometimes, you may want to compare the contents of a file to an eprom.
  273. This fuction will do that.  Select your source file, then your type file.  You
  274. can select one of the Generic types file for this application.  The first
  275. instance of a non-match will stop the checking, and report this error
  276. condition to you.  This works like a verify, in a way.
  277.  
  278.                            - 5. Save Part To File -
  279.     Select your file (remember, we are making a new file, so it doesn't have
  280. to exist yet on the disk), then select the part (again, since we are just
  281. reading a chip, a Generic part will do fine).  Click OK, and in a short while,
  282. the eprom contents are saved to the file.  The current software only saves in
  283. BINARY form, but the next major update will have support for an IFF-PROM
  284. format.
  285.  
  286.                          - 6. Program File to Prom -
  287.     Here's the fun part.  Select your source binary file, then your type file.
  288. In most cases, you will want to use the same type file as your part, because
  289. the Generic versions default to FAST programming, but the other type files
  290. support the fastest programming algorythm availible (for example, the TMS2732A
  291. doesn't support FAST, so selecting the Generic4k would be all worng).
  292.  
  293.     When your ready, press PROGRAM, then hold your breath.  LED D1 will light
  294. up, and so will LED D3 (Using certain sized eproms, LED D3 will flicker during
  295. programming.  This is because Vpp must be taken off the socket to verify the
  296. byte.  Don't worry, everything is OK).
  297.  
  298.     If the program was run though CLI, the current address is printed out every
  299. 1024 bytes.  You cannot abort this task.
  300.  
  301.   Two things can go wrong at this point:
  302.  
  303.     1.  Error during programming (this is REALLY fatal).  Assuming the type
  304.         file contains the correct data, this error means that it tried to
  305.         program one location at least 10-25 times, with no success.  This
  306.         usually indicates a faulty eprom.  Clear it under the UV lamp, then
  307.         try again.  If you still get the error, try the Generic type.  I use
  308.         the FAST algorythm as a last resort.  Though it takes much longer,
  309.         it usually gets the job done.  Only throw the chip away if your sure
  310.         that it's toast (eproms still cost a few bucks each, not like a dead
  311.         74LS00!).
  312.  
  313.     2.  File error.  Maybe you were programming a 16k x8 chip, but only
  314.         supplied a file 8192 bytes long.  Or you took out the disk.  Future
  315.         versions of this program will use real AmigaDOS file handling, and
  316.         at least take care of mis-matched file sizes.
  317.  
  318.     If the chip passed the intial programming sequence, D3 will turn off
  319. (indicating that the Vpp was taken off the socket, and the final verification
  320. is taking place.  Two things can go wrong at this point:
  321.  
  322.     1.  Error during final verify.  This shouldn't happen, but soemtime does.
  323.         Again, like the above error, this could mean the chip is faulty.
  324.         Clear it under the UV lamp, then try again.  If you still get the
  325.         error, throw the chip away.  If a chip doesn't pass final verify, then
  326.         the chip is damaged.
  327.  
  328.     2.  File error.  Same as the above file error.
  329.  
  330.     Assuming everything is OK, then you have a fully functional eprom.
  331.  
  332.                                 - 7. Cleared -
  333.     One thing the hardware cannot do is clear the eprom.  When you get the
  334. chip from the store, all the bits are set to 1, so reading a byte will provide
  335. 255 ($FF).  Before you program any eprom, you should run this test (on new
  336. chips and ones that have just come from under your UV lamp).  The amount of
  337. addresses checked depends again on your type file.  While the routine could
  338. report exactly how many bits are still at logic 0, it doesn't help.  A cleared
  339. bit is a cleared bit. It takes the same time under the UV lamp to set 1 bit,
  340. or 65536 bits.
  341.  
  342.                                - 8. Calibrate -
  343.     I suppose this test need only be run once, after the hardware is
  344. completed, but I suggest you do this a few times a year.  The voltage tests
  345. are more important than anything else.
  346.  
  347.     The tests assume you have a cabable power supply.  Most people will opt
  348. not to support the 21v programming mode (because it's so stupid).
  349.  
  350.                    * DON'T have a chip in the ZIF socket *
  351.    The voltages go everywhere, and you will either erase a chip, or blow it
  352.               up (which is, by far, the more visual of the two).
  353.  
  354.                                  - 9. About -
  355.            This will display some info about the program. Big Deal.
  356.  
  357.                                    - Quit -
  358.     Quit the program.
  359.  
  360.                            - Other Software Notes -
  361.  
  362.     Assign TYPES: to the directory where the type files are kept.  I know this
  363. software sucks, but I've been working on this project for the past few months,
  364. and the software part really strained my patience.
  365.  
  366.     The program ties up the PAR: device so that no other program can change
  367. the CIA registers (thus killing the hardware, I suppose).  If by some chance
  368. you have the programmer plugged in, and try to print to the printer, don't
  369. worry.  Every parallel device I design is 'idiot proofed'.  The hardware will
  370. be invisible under the printer.device.  But run DigiView, or some audio
  371. sampling software, and there could be problems.
  372.  
  373.     Why is the software so lame?
  374.  
  375.        'I would rather have my fingers on a breadboard than a keyboard'
  376.  
  377.     I think that sums it up pretty well.
  378.  
  379.  
  380.                         Call the SAPEP support board:
  381.     Silicon Synapse Electronics BBS  (204)589-1078  24hrs 1200-14.4 v32bis
  382.                  Megs and megs of Amiga electronic projects.
  383.  
  384. -EOF-
  385.